import request from '@/utils/request'

//获取列表
export function getTableList (data) {
    return request({
        url: '/clue/list',
        method: 'post',
        data
    })
}
export function delTable (id) {
    return request({
        url: `/table/list/${id}`,
        method: 'delete'
    })
}

//新建线索
export function addTableList (data) {
    return request({
        url: '/clue/save',
        method: 'post',
        data
    })
}

//线索跟进
export function Followupcoll (id){
    return request ({
        url:`/clue_follow/list/${id}`,
    })
}

//新增跟进
export function addfollowup (data){
    return request({
        url:'/clue_follow/save',
        method: 'post',   
        data
     })
}

//分配线索
export function Allocationcue (data){
    return request({
        url:'/clue/distribution',
        method: 'put',   
        data
     })
}

//伪线索
export function SpuriousclueApi (data){
    return request({
        url:`/clue_follow/failed/${data.clueId}`,
        method: 'post',   
        data
     })
}

//转商机
export function Businessopportunity (data){
    return request({
        url:`/clue_follow/business/${data.clueId}`,
        method: 'post',   
        data
     })
}

//获取部门
export function getDepartment () {
      return request({
        url: `/dictionary/dept`,
      })
    }


    //根据部门获取部门人员
export function getpersonnel (params){
        return request({
            url:'/dictionary/getUserBydeptName',
            params
         })
    }

//下载模板
export function getExportTemplate() {
        return request({
          url: '/clue_excel/load_model',
          responseType: 'blob' // 二进制文件流
        })
      }